package com.awesome.spring.sharding.service;

import com.awesome.spring.sharding.dao.OrderDao;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * @program: awesome-spring
 * @description: 订单逻辑处理器
 * @author: Alex Wu
 * @createDate: 2025-03-25 09:36
 **/

@Service
public class OrderService {

    @Autowired
    private OrderDao orderDao;


    public Boolean insertOrder() {
        for (int i = 0; i < 10; i++) {
            orderDao.insertOrder(new BigDecimal((i +1 ) *5), 1L, "ok");
        }
        return true;
    }
}
